package com.mc.service.impl;

import com.mc.bean.Team;
import com.mc.dao.Impl.TeamDaoImpl;
import com.mc.dao.TeamDao;
import com.mc.service.TeacherService;
import com.mc.service.TeamService;

import java.util.List;

/**
 * @author zh
 * 团队实体类数据接口实现类
 */
public class TeamServiceImpl implements TeamService {
    TeamDao teamDao=new TeamDaoImpl();

    @Override
    public List<Team> findAll() {
        return teamDao.findAll();
    }

    @Override
    public Team findTeamId(int teamid) {
        return teamDao.findTeamId(teamid);
    }

    @Override
    public boolean add(Team team) {
        return teamDao.add(team)>0?true:false;
    }

    @Override
    public boolean delete(int teamid) {
        return teamDao.delete(teamid)>0?true:false;
    }

    @Override
    public boolean update(Team team) {
        return teamDao.update(team)>0?true:false;
    }
}
